using System;
using UnityEngine;
public class SComBodyVEx:IVEx
{
public void SetData(ComponentData d){Debug.Assert(TargetType.IsAssignableFrom(d.ComponentType));_data=new WeakReference<ComponentData>(d);}
public SComBodyVEx(ComponentData d){SetData(d);}
public SComBodyVEx(){}
WeakReference<ComponentData> _data;
public UInt32 CompIdentity{get{if(_data.TryGetTarget(out ComponentData data))return data.CompIdentity;else throw new NullReferenceException("弱引用未找到");}}
public  Type TargetType=>typeof(SComBody);
public ComponentData Data{get{if(_data.TryGetTarget(out ComponentData data))return data;
else throw new NullReferenceException("弱引用未找到");}}
public System.String Abstract {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.String>(0);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.String>(0,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort AbstractId{get=>(ushort)0;}
public System.Int32 UserID {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Int32>(1);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Int32>(1,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort UserIDId{get=>(ushort)1;}
public UnityEngine.Vector3Int MeshPos {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<UnityEngine.Vector3Int>(2);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<UnityEngine.Vector3Int>(2,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort MeshPosId{get=>(ushort)2;}
public System.Boolean IsFliped {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Boolean>(3);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Boolean>(3,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort IsFlipedId{get=>(ushort)3;}
public System.Int32 MeshRotate {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Int32>(4);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Int32>(4,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort MeshRotateId{get=>(ushort)4;}
public System.Int32 PresentPos {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.Int32>(5);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.Int32>(5,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort PresentPosId{get=>(ushort)5;}
public System.String SpriteName {get{if(_data.TryGetTarget(out ComponentData data))return data.GetValue<System.String>(6);else throw new NullReferenceException("弱引用未找到");}
set{if(_data.TryGetTarget(out ComponentData data))data.SetValue<System.String>(6,value,true);else throw new NullReferenceException("弱引用未找到");}}
public static ushort SpriteNameId{get=>(ushort)6;}

}
